package com.example.common;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * @author  guochao
 * @date  2022/1/6 20:56
 * @version 1.0
 */
public class MyUtils {
    public static final String DATE_FORMAT="yyyy-MM-dd";
    public static final String DATE_TIME_FORMAT="yyyy-MM-dd HH:mm:ss";
    public static String dateFormat(Date date){
        return DateUtil.format(date,DATE_FORMAT);
    }
    public static String dateTimeFormat(Date date){
        return DateUtil.format(date,DATE_TIME_FORMAT);
    }
}
